<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.flying.dcss.userpermissions.bo.impl.DcssUser"%>
<%@page import="com.flying.dcss.userpermissions.bo.impl.DcssUserInfo"%>
<%@page import="com.flying.dcss.app.CommonHelper"%>
<%@page import="com.flying.dcss.app.SessionName"%>
<%@page import="com.sun.org.apache.bcel.internal.generic.NEW"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<%
	if (session.getAttribute(SessionName.UserSession) == null) {
		response.sendRedirect(basePath + "account/login.jsp");
		return;
	}
%>

<%
	DcssUser user = (DcssUser) request
			.getAttribute(SessionName.ProfileQueryUserSession);
	DcssUserInfo userInfo = (DcssUserInfo) request
			.getAttribute(SessionName.ProfileQueryUserInfoSession);

	//Keep.
	if (user == null)
		user = new DcssUser();
	if (userInfo == null)
		userInfo = new DcssUserInfo();
%>
<html>
	<head>
		<link rel="stylesheet" href="style/css1.css" />
	</head>
	<body>
		<div class="contentcontainer">
			<dl class="heading_1" style="height: 220px">
				<dt>
					<span>用户信息</span>
				</dt>

				<dd>
					<span class="spanstyle">用户名：</span>
					<label class="select lbl"><%=user.getUsername()%></label>
				</dd>
				<dd>
					<span class="spanstyle">权限等级：</span>
					<label class="select lbl"><%=CommonHelper.showLevelText(user.getLevel())%></label>
				</dd>

				<dd>
					<span class="spanstyle">最后登陆时间：</span>
					<label class="select lbl"><%=CommonHelper.formatDate(user.getLastLoginTime())%></label>
				</dd>


				<dd>
					<span class="spanstyle">用户状态：</span>
					<label class="select lbl"><%=CommonHelper.showUserStateText(user.getUserState())%></label>
				</dd>
				<dd
					style="width: 71px; height: 99px; position: relative; top: -100px; left: 600px">
					<%
						if (user.getEmail().equals("rodick@126.com")) {
					%>
					<input type="image" src="content/ld.jpg"
						style="width: 71px; height: 99px" />
					<%
						} else {
					%>
					<input type="image" src="content/wx.jpg"
						style="width: 71px; height: 99px" />
					<%
						}
					%>
				</dd>

			</dl>

			<dl class="heading_2">

				<dt>
					<span>详细资料</span>
				</dt>

				<dd>
					<span>姓名</span>
					<label class="select lbl"><%=userInfo.getRealName()%></label>
				</dd>
				<dd>
					<span class="spanstyle">Email：</span>
					<label class="select lbl"><%=user.getEmail()%></label>
				</dd>

				<dd>
					<span>工号</span>
					<label class="select lbl"><%=userInfo.getEmpoyeeNum()%></label>
				</dd>

				<dd>
					<span>手机号</span>
					<label class="select lbl"><%=user.getPhoneNum()%></label>
				</dd>
				<dd>
					<span>工作城市</span>
					<label class="select lbl"><%=userInfo.getCity()%></label>
				</dd>

				<dd>
					<span>工作地</span>
					<label class="select lbl"><%=userInfo.getAddress()%></label>
				</dd>

				<dd>
					<span>所在部门</span>
					<label class="select lbl"><%=userInfo.getDepartment()%></label>
				</dd>

				<dd
					style="width: 300px; height: 30px; float: right; margin-right: 50px">
					<input type="submit" value="显示详细" class="btn"
						style="width: 130px; height: 30px; float: right" />
				</dd>


			</dl>
		</div>
		<script language="javascript" type="text/javascript">
var hl = document.getElementById("high1");
hl.setAttribute("id", "active2");
</script>
	</body>
</html>